//package com.punch.order.controller;
//
//import com.punch.common.model.Result;
//import com.punch.common.page.PageInfo;
//import com.punch.common.query.registration.RegistrationQueryInfo;
//import com.punch.common.vo.order.CourseOrderStudentVO;
//import com.punch.common.vo.order.SimpleCourseOrderVO;
//import com.punch.common.vo.order.StudentSignUpVO;
//import com.punch.common.vo.registration.RegistrationVO;
//import com.punch.order.service.CourseOrderService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.time.LocalDate;
//import java.util.List;
//
///**
// * CourseOrderController-课程订单管理
// *
// * @author xiaol
// * @version 1.0.0
// * @since 2020/7/14 10:51
// */
//@RestController
//@Api(value = "CourseOrderController", tags = "课程订单管理Controller")
//public class CourseOrderController {
//
//    @Resource
//    private CourseOrderService courseOrderService;
//
//    /**
//     * 根据班级id查询班级报名情况
//     *
//     * @param registrationQueryInfo 班级报名情况条件
//     * @return OrderAppDetailVO
//     * @author xiaol
//     * @since 2020/7/23
//     */
//    @GetMapping(value = "/registration", produces = "application/json; charset=utf-8")
//    @ApiOperation(value = "根据班级id查询班级报名情况", notes = "根据班级id查询班级报名情况", produces = "application/json")
//    public Result<PageInfo<RegistrationVO>> registration(@ModelAttribute RegistrationQueryInfo registrationQueryInfo) {
//        return Result.succeed(courseOrderService.registration(registrationQueryInfo));
//    }
//
//
//    /**
//     * 根据学生id查找学生报名情况
//     *
//     * @param registrationQueryInfo 查询条件
//     * @return PageInfo<StudentSignUpVO>
//     */
//    @GetMapping(value = "/student/sign-up", produces = "application/json; charset=utf-8")
//    @ApiOperation(value = "根据班级id查询班级报名情况", notes = "根据班级id查询班级报名情况", produces = "application/json")
//    public Result<PageInfo<StudentSignUpVO>> studentSignUp(@ModelAttribute RegistrationQueryInfo registrationQueryInfo) {
//        return Result.succeed(courseOrderService.studentSignUp(registrationQueryInfo));
//    }
//
//    /**
//     * 获取开班课程的报名学生id列表
//     *
//     * @param classId 班级课程id
//     * @return 学生列表
//     */
//    @GetMapping(value = "/order/course-student/{courseId}/{classId}", produces = "application/json; charset=utf-8")
//    public List<CourseOrderStudentVO> getCourseStudent(@PathVariable("courseId") Long courseId, @PathVariable("classId") Long classId) {
//        return courseOrderService.getCourseStudent(courseId, classId);
//    }
//
//
//    /**
//     * 统计开班课程的报名学生
//     *
//     * @param classId 班级课程id
//     * @return 学生列表
//     */
//    @GetMapping(value = "/order/course-student-count/{courseId}/{classId}", produces = "application/json; charset=utf-8")
//    public int getCourseStudentCount(@PathVariable("courseId") Long courseId, @PathVariable("classId") Long classId) {
//        return courseOrderService.getCourseStudentCount(courseId, classId);
//    }
//
//
//    /**
//     * 更新该课程下开班的课程订单的已完成课时数
//     *
//     * @param courseId 课程id
//     * @param classId  班级id
//     * @return boolean
//     */
//    @PutMapping(value = "/order/course/{courseId}/{classId}/finish-count", produces = "application/json; charset=utf-8")
//    public Boolean updateClassFinishCount(@PathVariable("courseId") Long courseId, @PathVariable("classId") Long classId) {
//        return courseOrderService.updateClassFinishCount(courseId, classId);
//    }
//
//    /**
//     * 获取学生已报名的订单
//     *
//     * @param studentId 学生id
//     * @return list
//     */
//    @GetMapping(value = "/order/course/student/{studentId}", produces = "application/json; charset=utf-8")
//    public List<Long> getStudentCourseOrderId(@PathVariable("studentId") Long studentId) {
//        return courseOrderService.getStudentCourseOrderId(studentId);
//    }
//
//    /**
//     * 学生是否报名该课程
//     *
//     * @param classId   课程班级id
//     * @param studentId 学生id
//     * @return boolean
//     */
//    @GetMapping(value = "/order/course/{classId}/student/{studentId}", produces = "application/json; charset=utf-8")
//    public boolean isSignUp(@PathVariable("classId") Long classId, @PathVariable("studentId") Long studentId) {
//        return courseOrderService.isSignUp(classId, studentId);
//    }
//
//    /**
//     * 某学校某年级下的某个班级报名某个课程情况
//     *
//     * @param schoolName 学校名称
//     * @param gradeYear  年级
//     * @param gradeClass 班级
//     * @param className  报班名称
//     * @return SimpleCourseOrderVO
//     */
//    @GetMapping(value = "/order/course-class-simple", produces = "application/json; charset=utf-8")
//    public List<SimpleCourseOrderVO> getSimpleCourseClassOrder(@RequestParam("schoolName") String schoolName,
//                                                               @RequestParam("gradeYear") String gradeYear,
//                                                               @RequestParam("gradeClass") String gradeClass,
//                                                               @RequestParam(value = "className", required = false) String className) {
//        return courseOrderService.getSimpleCourseClassOrder(schoolName, gradeYear, gradeClass, className);
//    }
//
//
//    /**
//     * 运营修改开班时间
//     *
//     * @param classId  课程id
//     * @param openDate 开班时间
//     */
//    @PutMapping(value = "/order/course/open-date/{classId}", produces = "application/json; charset=utf-8")
//    public void feignUpdateCourseOrderOpenDate(@PathVariable("classId") Long classId, @RequestParam("openDate") LocalDate openDate) {
//        courseOrderService.feignUpdateCourseOrderOpenDate(classId, openDate);
//    }
//
//    /**
//     * 运营修改教师
//     *
//     * @param classId     课程id
//     * @param teacherName 教师名称
//     */
//    @PutMapping(value = "/order/course/teacher/{classId}", produces = "application/json; charset=utf-8")
//    public void feignUpdateCourseOrderTeacher(@PathVariable("classId") Long classId, @RequestParam("teacherName") String teacherName) {
//        courseOrderService.feignUpdateCourseOrderTeacher(classId, teacherName);
//    }
//
//    /**
//     * 运营修改教室
//     *
//     * @param classId       课程id
//     * @param classRoomName 教师
//     */
//    @PutMapping(value = "/order/course/classroom/{classId}", produces = "application/json; charset=utf-8")
//    public void feignUpdateCourseOrderClassRoom(@PathVariable("classId") Long classId, @RequestParam("classRoomName") String classRoomName) {
//        courseOrderService.feignUpdateCourseOrderClassRoom(classId, classRoomName);
//    }
//
//}
